package com.store.service;

import com.store.dto.request.ProductRequest;
import com.store.entity.Product;
import java.math.BigDecimal;
import java.util.List;

public interface ProductService {
    List<Product> getList(Integer page, Integer pageSize, String keyword, Long categoryId);
    Product findById(Long id);
    Product create(ProductRequest request);
    Product update(Long id, ProductRequest request);
    void delete(Long id);
    boolean existsById(Long id);
    Product getTopSalesProduct();
    BigDecimal getProductSales(Long id);
    List<String> getAllCategories();
    List<Product> getByCategory(Long categoryId, Integer page, Integer pageSize);
    List<Product> search(String keyword, Integer page, Integer pageSize);
    void updateStock(Long id, Integer stock);
    List<Product> selectList(int page, int pageSize);
    Product selectById(Long productId);
    List<Product> selectByCategoryId(Long categoryId);
    int insert(Product product);
    int update(Product product);
    int deleteById(Long productId);
    long count();
    long countByCategoryId(Long categoryId);
    List<Product> selectListByKeyword(String keyword, int page, int pageSize);
    List<Product> selectListByCategory(Long categoryId, int page, int pageSize);
    Product selectLatestProduct();
} 